import Taro, {Component} from '@tarojs/taro'
import {View, Text} from '@tarojs/components'
import './info.scss'

export default class Info extends Component {

  config = {
    navigationBarTitleText: '企业信息'
  }

  constructor(props) {
    super(props);
    this.state = {
      customerName: '',
      orgCode: '',
      area: '娄底市'
    }
  }
  componentWillMount() {
  }

  componentDidMount() {
    let {customerName, orgCode} = JSON.parse(this.$router.params.customer);
    this.setState({
      customerName,
      orgCode
    })
  }

  componentWillUnmount() {
  }

  componentDidShow() {
  }

  componentDidHide() {
  }

  render() {
    return (
      <View className='container'>
        <View className='list'>
          <Text className='title'>企业名称</Text>
          <Text className='desc'>{this.state.customerName}</Text>
        </View>
        <View className='list'>
          <Text className='title'>所在区域</Text>
          <Text className='desc'>{this.state.area}</Text>
        </View>
        <View className='list'>
          <Text className='title'>组织机构代码</Text>
          <Text className='desc'>{this.state.orgCode}</Text>
        </View>
      </View>
    )
  }
}
